<!-- 客户管理-基础设置-客户设置 -->
<template>
  <div class="base-setting">
    <pageHeader
      :title="title"
      :breadCrumb="breadCrumb"
      :isShowBtn="false"
    ></pageHeader>
    <div class="base-setting-warp">
      <div v-for="(item, index) in setting" :key="index">
        <settingWrap
          @goDetail="goDetail(item)"
          :name="item.name"
          :description="item.description"
          :icon="item.icon"
        ></settingWrap>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { reactive, ref } from 'vue';
  import pageHeader from '@/components/page-header/index.vue';
  import settingWrap from '@/components/setting-wrap/index.vue';
  import { useRouter } from 'vue-router';
  import { settingWarp } from '@/types/global';

  const router = useRouter();
  const title: string = '基础设置';

  const breadCrumb: string[] = ['订单管理', '客户管理', '基础设置'];

  const setting = reactive<Array<settingWarp>>([
    {
      name: '客户设置',
      description: '-主要用于配置客户的来源、类别、等级',
      icon: 'icon-settings',
      path: 'ClientBaseSetting',
    },
    {
      name: '客户跟进状态设置',
      description: '-主要用于配置客户跟进成效等级',
      icon: 'icon-settings',
      path: 'ClientEffectSetting',
    },
    {
      name: '客户编号设置',
      description: '-主要用于配置客户身份编号',
      icon: 'icon-settings',
      path: 'ClientCodeSetting',
    },
  ]);

  const goDetail = (item: any) => {
    router.push({
      name: item.path,
    });
  };
</script>

<style scoped lang="less">
  .base-setting {
    &-warp {
      display: flex;
      flex: 1;
      flex-wrap: wrap;
    }
  }
</style>
